package com.pgeg.registry;

import net.minecraft.item.Item;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

import static com.pgeg.listener.ArmorListener.*;
import static com.pgeg.util.Reference.MODID;

public class ArmorRegistry {

    public static void registerArmor() {
        /*Helmets*/
        initArmor("copper_helmet", COPPER_HELMET);
        initArmor("silver_helmet", SILVER_HELMET);
        initArmor("redstone_helmet", REDSTONE_HELMET);

        /*Chestplates*/
        initArmor("copper_chestplate", COPPER_CHESTPLATE);
        initArmor("silver_chestplate", SILVER_CHESTPLATE);
        initArmor("redstone_chestplate", REDSTONE_CHESTPLATE);

        /*Leggings*/
        initArmor("copper_leggings", COPPER_LEGGINGS);
        initArmor("silver_leggings", SILVER_LEGGINGS);
        initArmor("redstone_leggings", REDSTONE_LEGGINGS);

        /*Boots*/
        initArmor("copper_boots", COPPER_BOOTS);
        initArmor("silver_boots", SILVER_BOOTS);
        initArmor("redstone_boots", REDSTONE_BOOTS);
    }

    private static void initArmor(String path, Item item) {
        Registry.register(Registry.ITEM, new Identifier(MODID, path), item);
    }
}
